<?php

namespace App\Models\Syj;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class lives extends Model
{
    use HasFactory;
    protected $table='lives';
    //直播间展示
    public static function listLives(){
        return self::where(['is_del'=>0,'status'=>1])->paginate(5)->toArray();
    }

    //删除直播间
    public static function removeLive(array $id){
        return self::where('id',$id)->update(['is_del'=>1]);
    }

    //增
    public static function addLive($param){
        return self::insert($param);
    }
    //改

}
